import {createApp} from 'vue'
import 'element-plus/dist/index.css'
import * as ElIconModules from "@element-plus/icons-vue";
import App from './App.vue'
import store from "./store/index";
import router from './router/index'

function transElIconName(iconName) {
  return 'i' + iconName.replace(/[A-Z]/g, (match) => '-' + match.toLowerCase())
}

const app = createApp(App)

for (let iconName in ElIconModules) {
  app.component(transElIconName(iconName), ElIconModules[iconName])
}

app.use(router)
app.use(store)
app.mount('#app')

